import { transformI18n } from '@/plugins/i18n'

const Layout = () => import('@/layout/index.vue')

export default {
  path: '/admin',
  name: 'Home',
  component: Layout,
  redirect: '/admin/welcome',
  meta: {
    title: transformI18n('menus.home'),
    icon: 'icon-home',
    rank: -1
  },
  children: [
    {
      path: '/admin/welcome',
      name: 'Welcome',
      component: () => import('@/views/admin/welcome/index.vue'),
      meta: {
        title: transformI18n('menus.home'),
        showLink: false,
        activePath: '/'
      }
    },
    {
      path: '/admin/noticeUser',
      name: 'NoticeUser',
      component: () => import('@/views/admin/notice/index.vue'),
      meta: {
        title: transformI18n('menus.noticeUser'),
        showLink: false,
        activePath: '/'
      }
    },
    {
      path: '/admin/userInfo',
      name: 'UserInfo',
      component: () => import('@/views/admin/userInfo/index.vue'),
      meta: {
        title: transformI18n('menus.userInfo'),
        showLink: false,
        activePath: '/'
      }
    },

    {
      path: '/admin/404',
      name: '404',
      component: () => import('@/views/admin/error-page/404.vue'),
      meta: {
        title: '404',
        showLink: false
      }
    },
    {
      path: '/admin/403',
      name: '403',
      component: () => import('@/views/admin/error-page/403.vue'),
      meta: {
        title: '403',
        showLink: false
      }
    },
    {
      path: '/admin/500',
      name: '500',
      component: () => import('@/views/admin/error-page/500.vue'),
      meta: {
        title: '500',
        showLink: false
      }
    }
  ]
} satisfies RouteConfigsTable
